package cate.game.play.vo;

import cate.game.play.fighter.Fighter;
import easy.java.dev.note.NoteField;

public class FighterStatVO {

	@NoteField( "战斗对象的剧本临时ID")
	public int pid;

	@NoteField( "造成的伤害")
	public long damage = 0;

	@NoteField("造成的治疗")
	public long heal = 0;

	@NoteField("承受的伤害")
	public long hurt = 0;

	public FighterStatVO read(Fighter fighter) {
		pid = fighter.getPid();
		damage = fighter.getPerformance().damage;
		heal = fighter.getPerformance().heal;
		hurt = fighter.getPerformance().hurt;
		return this;
	}

	public void merge(FighterStatVO stat) {
		this.damage += stat.damage;
		this.heal += stat.heal;
		this.hurt += stat.hurt;
	}

	public void divide(int num){
		damage/=num;
		heal/=num;
		hurt/=num;
	}


}
